home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 23 / CU Amiga - Super CD-ROM 23 (June 1998).iso / CreatingGames / Utilities / C / ASAP / catalog.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-09-08  |  2.8 KB  |  68 lines

  1. /*****************************************************************************
  2.  *                                                                           *
  3.  * ASAP - Amiga Software Authoring Platform                                  *
  4.  *                                                                           *
  5.  * Written by Laurie Perrin                                                  *
  6.  *                                                                           *
  7.  * ACatalog wrapper class                                                    *
  8.  *                                                                           *
  9.  *****************************************************************************/
  10.  
  11. #ifndef ASAP_Catalog_H
  12. #define ASAP_Catalog_H
  13.  
  14. #include <New.h>
  15.  
  16. extern "C"
  17. {
  18.  #include <Proto/Locale.h>
  19. }
  20.  
  21. class ACatalog : public Catalog
  22. {
  23.  inline void CloseCatalog();
  24.  inline void operator delete (void *catalog);
  25.  inline STRPTR GetCatalogStr(long stringNum, STRPTR defaultString );
  26.  inline static ACatalog * OpenCatalogA(Locale *locale, STRPTR name, TagItem *tags );
  27.  inline void * operator new (size_t, Locale *locale, STRPTR name, TagItem *tags);
  28.  inline static ACatalog * OpenCatalog( Locale *locale, STRPTR name, Tag tag1, ... );
  29.  inline void * operator new (size_t, Locale *locale, STRPTR name, Tag tag1, ...);
  30. };
  31. //-----------------------------------------------------------------------------
  32. void ACatalog::CloseCatalog ()
  33. {
  34.  ::CloseCatalog(this);
  35. }
  36. //-----------------------------------------------------------------------------
  37. void ACatalog::operator delete (void *catalog)
  38. {
  39.  ((ACatalog *) catalog)->CloseCatalog();
  40. }
  41. //-----------------------------------------------------------------------------
  42. STRPTR ACatalog::GetCatalogStr (long stringNum, STRPTR defaultString )
  43. {
  44.  return ::GetCatalogStr(this, stringNum, defaultString);
  45. }
  46. //-----------------------------------------------------------------------------
  47. ACatalog * ACatalog::OpenCatalogA (Locale *locale, STRPTR name, TagItem *tags )
  48. {
  49.  return (ACatalog *) ::OpenCatalogA(locale, name, tags);
  50. }
  51. //-----------------------------------------------------------------------------
  52. void * ACatalog::operator new (size_t, Locale *locale, STRPTR name, TagItem *tags)
  53. {
  54.  return ACatalog::OpenCatalogA(locale, name, tags);
  55. }
  56. //-----------------------------------------------------------------------------
  57. ACatalog * ACatalog::OpenCatalog (Locale *locale, STRPTR name, Tag tag1, ... )
  58. {
  59.  return ACatalog::OpenCatalogA(locale, name, (TagItem *) &tag1);
  60. }
  61. //-----------------------------------------------------------------------------
  62. void * ACatalog::operator new (size_t, Locale *locale, STRPTR name, Tag tag1, ...)
  63. {
  64.  return ACatalog::OpenCatalogA(locale, name, (TagItem *) &tag1);
  65. }
  66.  
  67. #endif
  68.